using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace Easy.Geo.Kml
{       
    public class Coordinate
    {        
        public Coordinate() { }
        public Coordinate(float latitude, float longitude, float altitude)
        {
            this._latitude = latitude;
            this._longitude = longitude;
            this._altitude = altitude;
        }
        private float _latitude;
        [XmlIgnore()]
        public float Latitude
        {
            get { return _latitude; }
            set { _latitude = value; }
        }
        private float _longitude;
        [XmlIgnore()]
        public float Longitude
        {
            get { return _longitude; }
            set { _longitude = value; }
        }
        private float _altitude;
        [XmlIgnore()]
        public float Altitude
        {
            get { return _altitude; }
            set { _altitude = value; }
        }
        
        public override string ToString()
        {
            return this._longitude.ToString(Utils.KFloatFormatInfo) + "," +
                   this._latitude.ToString(Utils.KFloatFormatInfo) + ",0";            
        }
    }
}
